home *** CD-ROM | disk | FTP | other *** search
/ PC for Alla 2005 April / PC för Alla 0504.iso / noje / arcade-3.6.exe / tetris.swf / scripts / frame_2 / DoAction.as
Encoding:
Text File  |  2003-11-29  |  628 b   |  33 lines

  1. String.prototype.addCommas = function()
  2. {
  3.    var len = this.length;
  4.    var str = "";
  5.    var i = 0;
  6.    while(i <= len)
  7.    {
  8.       str = this.charAt(len - i) + str;
  9.       if(i % 3 == 0 && i > 0 && i < len)
  10.       {
  11.          str = "," + str;
  12.       }
  13.       i++;
  14.    }
  15.    return str;
  16. };
  17. game_so = SharedObject.getLocal("neaveTetris");
  18. score = 0;
  19. level = startLevel;
  20. play_btn.onRelease = function()
  21. {
  22.    Key.removeListener(keyListener);
  23.    play();
  24. };
  25. highScores_btn.onRelease = function()
  26. {
  27.    gotoAndStop(25);
  28. };
  29. neave_btn.onRelease = function()
  30. {
  31.    getUrl("http://www.neave.com/games/", "_blank");
  32. };
  33.